package cn.com.oidreams.wechat.robot.entity;

import cn.com.oidreams.common.annotations.Required;
import cn.com.oidreams.wechat.robot.enums.WeXinTalkEnum;
import lombok.Data;

/***
 ** @category 请文件类型消息
 ** @author qing.yunhui
 ** @email: qingyh@glodon.com
 ** @createTime: 2021-12-15 9:46
 **/
@Data
public class FileMsgRequest extends BaseRequest{

    public FileMsgRequest(FileMedia file) {
        setMsgtype(WeXinTalkEnum.MSG_TYPE.FILE.getCode());
        this.file=file;
    }
    @Required(errorMsg = "文件i必填",remark = "文件id，通过下文的文件上传接口获取;")
    private FileMedia file;

    @Data
    public static class FileMedia{
        @Required(errorMsg = "文件id必填",remark = "文件id，通过下文的文件上传接口获取;")
        private String media_id;
        public FileMedia(String media_id) {
            this.media_id = media_id;
        }
    }
}
